require 'mongrel_cluster/recipes'
set :application, "13wins"
set :repository,  "http://13wins.googlecode.com/svn/trunk/"

# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
# set :deploy_to, "/var/www/#{application}"

# If you aren't using Subversion to manage your source code, specify
# your SCM below:
set :scm, :subversion
set :user, "9a860085"
set :password, "ws9xp66wee"
set :use_sudo, false
set :mongrel_conf, "/home/9a860085/web/13wins"
set :app_root, "/home/9a860085/web/13wins"
role :app, "8.17.82.203"

task :remote_deploy,:roles=>[:app] do
  run "cd #{app_root} && /opt/local/bin/svn up"
  run "cd #{app_root} && /opt/local/bin/mongrel_rails restart"
end
task :dep,:roles=>[:app] do
  run "cd #{app_root} && /opt/local/bin/svn up"
  run "cd #{app_root} && /opt/local/bin/mongrel_rails restart"
end

task :migration,:roles=>[:app] do
  run "cd #{app_root} && /opt/local/bin/rake db:migrate RAILS_ENV=production"
end
task :remote_log,:roles=>[:app] do
  run "cd #{app_root} && tail -f log/production.log"
end
task :log,:roles=>[:app] do
  run "cd #{app_root} && tail -f log/production.log"
end

task :restart,:roles=>[:app] do
  run "cd #{app_root} && /opt/local/bin/mongrel_rails restart"
end
